OPC Studio User's Guide and Reference
ReadMultipleItems(IEasyDAClient,DAItemArguments[],DAReadParameters) Method



OpcLabs.EasyOpcClassicCore Assembly > OpcLabs.EasyOpc.DataAccess Namespace > IEasyDAClientExtension Class > ReadMultipleItems Method : ReadMultipleItems(IEasyDAClient,DAItemArguments[],DAReadParameters) Method
The client object that will perform the operation.
Array of item arguments objects (determine the OPC server and an OPC-DA item).
The read parameters (such as data source or value age).
Reads multiple named items from a single OPC server, using item arguments objects, and common read parameters.
Syntax
'Declaration
 
<ExtensionAttribute()>
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Public Overloads Shared Function ReadMultipleItems( _
   ByVal client As IEasyDAClient, _
   ByVal itemArgumentsArray() As DAItemArguments, _
   ByVal readParameters As DAReadParameters _
) As DAVtqResult()
'Usage
 
Dim client As IEasyDAClient
Dim itemArgumentsArray() As DAItemArguments
Dim readParameters As DAReadParameters
Dim value() As DAVtqResult
 
value = IEasyDAClientExtension.ReadMultipleItems(client, itemArgumentsArray, readParameters)
[Extension()]
[ElementsNotNull()]
[NotNull()]
public static DAVtqResult[] ReadMultipleItems( 
   IEasyDAClient client,
   DAItemArguments[] itemArgumentsArray,
   DAReadParameters readParameters
)
[Extension()]
[ElementsNotNull()]
[NotNull()]
public:
static array<DAVtqResult^>^ ReadMultipleItems( 
   IEasyDAClient^ client,
   array<DAItemArguments^>^ itemArgumentsArray,
   DAReadParameters^ readParameters
) 

Parameters

client
The client object that will perform the operation.
itemArgumentsArray
Array of item arguments objects (determine the OPC server and an OPC-DA item).
readParameters
The read parameters (such as data source or value age).

Return Value

The function returns an array of OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult objects. The indices of elements in the output array are the same as those in the input array, itemArgumentsArray.
Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

The servers can be local or can be remotely accessed via DCOM. Optionally, an access path can be specified or a specific data type can be requested.

The ReadMultipleItems method only waits for the first update from the server (or until the timeout elapses) for each item; it does not wait until the quality becomes "uncertain" or "good". The function performs all individual operations in parallel, but only returns after all individual operations are completed (or their timeouts elapse).

This method does not throw an exception in case of OPC operation failures. Instead, the eventual exception related to each item is returned in Exception property of each returned OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult element.

The size of the input array will become the size of the output array. The element positions (indices) in the output array are the same as in the input array.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also